package com.example.demo.service;

import com.example.demo.mapper.JobMapper;
import com.example.demo.pojo.Job;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class JobService {

    @Autowired
    private JobMapper jobMapper;

    public List<Job> getAllJob(){
        return jobMapper.selectAll();
    }

    public void addNewJob(Job job){ jobMapper.addJob(job);}

    public void deleteJobById(int id){ jobMapper.deleteJobById(id);}

    public void updateJob(Job job){ jobMapper.updateJob(job);}

    public Job selectJobById(int id){ return jobMapper.selectJobById(id);}
}
